home *** CD-ROM | disk | FTP | other *** search
- Unit Meta;
- Interface
-
- Uses Fastwr;
-
- {FastWrite is a Public Domain text display Package By Brian Foley
- available on Compuserve. GO BOR-100, the file is in LIB 2. You may
- modify the routines to use any other procedure you want. FASTWR.TPU
- has proven itself to be bug free and FAST! }
-
- Var
- MetaPos, LastLine : Integer;
-
-
- {LastLines value MUST be assigned here in the Meta file. It defines the lower
- border of the window around the metaphor. Therefore the maximum should be 25
- and the minimum should be Row 7 for a minimal window around the inner frame.
-
- MetaPos is a global variable used by CALC.TPU to reposition the window when
- moved on screen. }
-
- Procedure DrawCalculator;
-
- Implementation
-
-
- Procedure DrawCalculator;
- Begin
-
-
- {Usage: procedure FastWrite(St : string; Row, Col, Attr : Byte);
- The Row value of 1 is reserved for the the CALC.TPU generated window.
- The width is also fixed in this release of CALC.TPU, but you may change
- the value of LastLine to modify the window size, from the bottom up.
- The calculator always remains anchored to the top of the screen. }
-
- FastWrite('╔════════════════════════╗',3,MetaPos,7);
- FastWrite('║ ║',4,MetaPos,7);
- FastWrite('╚════════════════════════╝',5,MetaPos,7);
-
- {Unless you want only the result in its own small window, use this
- "inner window" to frame the numeric data, which allways appears on Row 4.}
-
- FastWrite('┌───┐ ┌───┐ ┌───┐ ┌───┐',7,MetaPos,15);
- FastWrite('│ 7 │ │ 8 │ │ 9 │ │ / │',8,MetaPos,15);
- FastWrite('└───┘ └───┘ └───┘ └───┘',9,MetaPos,15);
-
- FastWrite('┌───┐ ┌───┐ ┌───┐ ┌───┐',10,MetaPos,15);
- FastWrite('│ 4 │ │ 5 │ │ 6 │ │ * │',11,MetaPos,15);
- FastWrite('└───┘ └───┘ └───┘ └───┘',12,MetaPos,15);
-
- FastWrite('┌───┐ ┌───┐ ┌───┐ ┌───┐',13,MetaPos,15);
- FastWrite('│ 1 │ │ 2 │ │ 3 │ │ - │',14,MetaPos,15);
- FastWrite('└───┘ └───┘ └───┘ └───┘',15,MetaPos,15);
-
- FastWrite('┌───┐ ┌───┐ ┌───┐ ┌───┐',16,MetaPos,15);
- FastWrite('│ 0 │ │ · │ │ = │ │ + │',17,MetaPos,15);
- FastWrite('└───┘ └───┘ └───┘ └───┘',18,MetaPos,15);
- FastWrite('┌───┐ ┌───┐ ┌──────────┐',19,MetaPos,15);
- FastWrite('│ C │ │cE │ │- - Move│',20,MetaPos,15);
- FastWrite('└───┘ └───┘ └──────────┘',21,MetaPos,15);
- FastWrite(' Esc Quits - F10 to Paste ',23,MetaPos,15);
- end;
-
- Begin
- (* Meta*)
- LastLine := 25;
-
- { Lastline Must be set to define the position of the bottom of the window.
- Note that it is one more that the last row in the FastWrite calls above. }
-
- end.
-